<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;
//页面
Route::any('index', 'index/index');//首页

Route::any('about', 'index/about');//关于我们

Route::any('contact', 'index/contact');//联系我们

Route::any('details', 'index/details');//详情

Route::get("product_details","index/product_details");//购物车结算-地址填写

Route::any('login', 'index/login');//登录

Route::any('register', 'index/register');//注册会员

Route::any("user_login","login/login");//登录

Route::any('register_wholesale', 'index/register_wholesale');//注册批发商

Route::any('wholesale','index/wholesale');//批发商
Route::get("order_cart","index/order_cart");//购物车结算-结算信息
Route::get("order_list","index/order_list");//购物车列表
Route::get("checkout","index/checkout");//购物车结算-地址填写
//页面
Route::post('registerUser', 'Login/registerUser');//注册会员
Route::post('registerWholesale','Login/registerWholesale');//注册批发商

Route::group("wholesale",function(){
    Route::any("register","login/registerWholesale");
});

//产品
Route::group("product",function(){
	Route::any("test","Product/test");
});

Route::group("file", function (){
    Route::any("upload","File/uploadFile");//图片上传
});
//购物车
Route::group("trolley", function (){
    Route::get("list","Trolley/list");//获取购物车列表
    Route::post("add","Trolley/add");//购物车-添加
    Route::post("edit","Trolley/edit");//购物车-编辑
    Route::get("del","Trolley/del");//购物车-删除
//    Route::get("del","Trolley/del");//购物车-删除
});
//订单
Route::group("order", function (){
    Route::post("cartList","Order/cartList");
    Route::get("list","Order/list");//购物车结算-结算信息
    Route::get("shoppingCart","Order/shoppingCart");//购物车结算-结算信息
    Route::post("takeOrder","Order/takeOrder");//下单
    Route::post("edit","Order/edit");//购物车-编辑
    Route::get("del","Order/del");//购物车-删除

    Route::post("orderList","Order/orderList");
//    Route::get("del","Trolley/del");//购物车-删除
});

//paypal支付
Route::group("paypal", function (){
    Route::any("index","Order/payOrder");//购物车结算-结算信息
    Route::post("returnUrl","Paypal/returnUrl");//成功回调
    Route::post("cancelUrl","Paypal/cancelUrl");//取消回调
});

